package com.cb.eduservice.controller;

import com.cb.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

/**
 * 登录
 *
 * @author cb
 * @version 1.0
 * @date 2020/6/21 19:07
 */
@Api(description = "后台登录管理")
@RestController
@RequestMapping("/eduservice/user")
public class EduLoginController {

    @ApiOperation("管理员登录")
    @PostMapping("login")
    public R login(){

        return R.ok().data("token","admin");
    }

    @ApiOperation("用户信息获取")
    @GetMapping("info")
    public R info(){

        return R.ok()
                .data("roles","[admin]")
                .data("name","Cebb")
                .data("avatar","https://unsplash.it/100/100?image=1005");
    }

}
